package cn.shutdown.demo.jvm;

/**
 * @author jiangwujie
 * @date 2021/7/6
 */
public class StrongReference {
    public static void main(String[] args) {
        StringBuilder sb1 = new StringBuilder("abcde");
        StringBuilder sb2 = sb1;
        System.out.println(sb1 == sb2);
        System.out.println(sb1.equals(sb2));

        sb1 = new StringBuilder("fgihjk");
        System.out.println(sb1 == sb2);
        System.out.println(sb1.equals(sb2));
    }
}
